home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
prolog
/
ai.prl
/
opnprlg1.hqx
/
Open Prolog
/
Open Prolog.rsrc
/
CODE_27_startupStuff.txt
< prev
next >
Wrap
Text File
|
1993-04-15
|
16KB
|
283 lines
# near model CODE resource
# entry label at 0x0000
export_407:
entry:
00000000 4E56 FFEA link A6, -0x0016
00000004 48E7 F0C0 movem.l -[A7], D0,D1,D2,D3,A0,A1
00000008 42AD F4FA clr.l [A5 - 0xB06]
0000000C 7000 moveq.l D0, 0x00
0000000E 3D40 FFF4 move.w [A6 - 0xC], D0
00000012 A122 trap NewHandle, flags=1
00000014 3F38 0220 move.w -[A7], [0x00000220 /* MemErr */]
00000018 6708 beq +0xA /* 00000022 */
0000001A 487A 030A pea.l [PC + 0x30A /* 00000326 */]
0000001E 4EAD 0CD2 jsr [A5 + 0xCD2]
label00000022:
00000022 548F addq.l A7, 2
00000024 2D48 0008 move.l [A6 + 0x8], A0
00000028 7008 moveq.l D0, 0x08
0000002A 3D40 FFF6 move.w [A6 - 0xA], D0
0000002E A122 trap NewHandle, flags=1
00000030 3F38 0220 move.w -[A7], [0x00000220 /* MemErr */]
00000034 6708 beq +0xA /* 0000003E */
00000036 487A 02EE pea.l [PC + 0x2EE /* 00000326 */]
0000003A 4EAD 0CD2 jsr [A5 + 0xCD2]
label0000003E:
0000003E 548F addq.l A7, 2
00000040 2D48 000C move.l [A6 + 0xC], A0
00000044 A029 trap HLock
00000046 3F38 0220 move.w -[A7], [0x00000220 /* MemErr */]
0000004A 6708 beq +0xA /* 00000054 */
0000004C 487A 02D8 pea.l [PC + 0x2D8 /* 00000326 */]
00000050 4EAD 0CD2 jsr [A5 + 0xCD2]
label00000054:
00000054 548F addq.l A7, 2
00000056 2010 move.l D0, [A0]
00000058 C0AD FDA4 and.l D0, [A5 - 0x25C]
0000005C 2240 movea.l A1, D0
0000005E 4299 clr.l [A1]+
00000060 4259 clr.w [A1]+
00000062 4251 clr.w [A1]
00000064 A02A trap HUnlock
00000066 3F38 0220 move.w -[A7], [0x00000220 /* MemErr */]
0000006A 6708 beq +0xA /* 00000074 */
0000006C 487A 02B8 pea.l [PC + 0x2B8 /* 00000326 */]
00000070 4EAD 0CD2 jsr [A5 + 0xCD2]
label00000074:
00000074 548F addq.l A7, 2
00000076 4FEF FFFE lea.l A7, [A7 - 0x2]
0000007A 2F3C 5052 4C58 move.l -[A7], 0x50524C58 /* 'PRLX' */
00000080 A99C trap CountResources
00000082 3F38 0A60 move.w -[A7], [0x00000A60 /* ResErr */]
00000086 6708 beq +0xA /* 00000090 */
00000088 487A 029C pea.l [PC + 0x29C /* 00000326 */]
0000008C 4EAD 0CD2 jsr [A5 + 0xCD2]
label00000090:
00000090 548F addq.l A7, 2
00000092 3D5F FFFE move.w [A6 - 0x2], [A7]+
00000096 6700 026C beq +0x26E /* 00000304 */
0000009A 3D7C 0001 FFFC move.w [A6 - 0x4], 0x1
label000000A0:
000000A0 4FEF FFFC lea.l A7, [A7 - 0x4]
000000A4 2F3C 5052 4C58 move.l -[A7], 0x50524C58 /* 'PRLX' */
000000AA 3F2E FFFC move.w -[A7], [A6 - 0x4]
000000AE A99D trap GetIndResource
000000B0 3F38 0A60 move.w -[A7], [0x00000A60 /* ResErr */]
000000B4 6708 beq +0xA /* 000000BE */
000000B6 487A 026E pea.l [PC + 0x26E /* 00000326 */]
000000BA 4EAD 0CD2 jsr [A5 + 0xCD2]
label000000BE:
000000BE 548F addq.l A7, 2
000000C0 205F movea.l A0, [A7]+
000000C2 2D48 FFF8 move.l [A6 - 0x8], A0
000000C6 A069 trap HGetState
000000C8 3F38 0220 move.w -[A7], [0x00000220 /* MemErr */]
000000CC 6708 beq +0xA /* 000000D6 */
000000CE 487A 0256 pea.l [PC + 0x256 /* 00000326 */]
000000D2 4EAD 0CD2 jsr [A5 + 0xCD2]
label000000D6:
000000D6 548F addq.l A7, 2
000000D8 1D40 FFEB move.b [A6 - 0x15], D0
000000DC A029 trap HLock
000000DE 3F38 0220 move.w -[A7], [0x00000220 /* MemErr */]
000000E2 6708 beq +0xA /* 000000EC */
000000E4 487A 0240 pea.l [PC + 0x240 /* 00000326 */]
000000E8 4EAD 0CD2 jsr [A5 + 0xCD2]
label000000EC:
000000EC 548F addq.l A7, 2
000000EE 2010 move.l D0, [A0]
000000F0 C0AD FDA4 and.l D0, [A5 - 0x25C]
000000F4 2240 movea.l A1, D0
000000F6 2D49 FFEE move.l [A6 - 0x12], A1
000000FA 41ED 0CE2 lea.l A0, [A5 + 0xCE2]
000000FE 2B48 F4E4 move.l [A5 - 0xB1C], A0
00000102 42AD F3CE clr.l [A5 - 0xC32]
00000106 3B7C 0001 F3C6 move.w [A5 - 0xC3A], 0x1
0000010C 48ED 1CF8 F3A6 movem.l [A5 - 0xC5A], A4,A3,A2,D7,D6,D5,D4,D3
00000112 486D F3C6 pea.l [A5 - 0xC3A]
00000116 4E91 jsr [A1]
00000118 4CED 1CF8 F3A6 movem.l A4,A3,A2,D7,D6,D5,D4,D3, [A5 - 0xC5A]
0000011E 0CAD 0000 0004 F3CE cmpi.l [A5 - 0xC32], 0x4
00000126 670C beq +0xE /* 00000134 */
00000128 3F3C 0027 move.w -[A7], 0x27 /* ''' */
0000012C 4EAD 04FA jsr [A5 + 0x4FA]
00000130 6000 01A2 bra +0x1A4 /* 000002D4 */
label00000134:
00000134 202D F3CA move.l D0, [A5 - 0xC36]
00000138 6700 01B8 beq +0x1BA /* 000002F2 */
0000013C 3D40 FFF2 move.w [A6 - 0xE], D0
00000140 3D7C 0001 FFEC move.w [A6 - 0x14], 0x1
label00000146:
00000146 3B7C 0002 F3C6 move.w [A5 - 0xC3A], 0x2
0000014C 3B6E FFEC F3C8 move.w [A5 - 0xC38], [A6 - 0x14]
00000152 48ED 1CF8 F3A6 movem.l [A5 - 0xC5A], A4,A3,A2,D7,D6,D5,D4,D3
00000158 486D F3C6 pea.l [A5 - 0xC3A]
0000015C 226E FFEE movea.l A1, [A6 - 0x12]
00000160 4E91 jsr [A1]
00000162 4CED 1CF8 F3A6 movem.l A4,A3,A2,D7,D6,D5,D4,D3, [A5 - 0xC5A]
00000168 7000 moveq.l D0, 0x00
0000016A 102D F3E4 move.b D0, [A5 - 0xC1C]
0000016E 5080 addq.l D0, 8
00000170 0800 0000 btst.b D0, 0x0
00000174 6702 beq +0x4 /* 00000178 */
00000176 5280 addq.l D0, 1
label00000178:
00000178 D06E FFF6 add.w D0, [A6 - 0xA]
0000017C 206E 000C movea.l A0, [A6 + 0xC]
00000180 A024 trap SetHandleSize
00000182 3F38 0220 move.w -[A7], [0x00000220 /* MemErr */]
00000186 6708 beq +0xA /* 00000190 */
00000188 487A 019C pea.l [PC + 0x19C /* 00000326 */]
0000018C 4EAD 0CD2 jsr [A5 + 0xCD2]
label00000190:
00000190 548F addq.l A7, 2
00000192 206E 000C movea.l A0, [A6 + 0xC]
00000196 A029 trap HLock
00000198 3F38 0220 move.w -[A7], [0x00000220 /* MemErr */]
0000019C 6708 beq +0xA /* 000001A6 */
0000019E 487A 0186 pea.l [PC + 0x186 /* 00000326 */]
000001A2 4EAD 0CD2 jsr [A5 + 0xCD2]
label000001A6:
000001A6 548F addq.l A7, 2
000001A8 2010 move.l D0, [A0]
000001AA C0AD FDA4 and.l D0, [A5 - 0x25C]
000001AE 2240 movea.l A1, D0
000001B0 5269 0006 addq.w [A1 + 0x6], 1
000001B4 302E FFF6 move.w D0, [A6 - 0xA]
000001B8 43F1 0000 lea.l A1, [A1 + D0.w]
000001BC 41ED F3E4 lea.l A0, [A5 - 0xC1C]
000001C0 4219 clr.b [A1]+
000001C2 12ED F3CD move.b [A1]+, [A5 - 0xC33]
000001C6 7000 moveq.l D0, 0x00
000001C8 1018 move.b D0, [A0]+
000001CA 32C0 move.w [A1]+, D0
000001CC 5340 subq.w D0, 1
000001CE 6B06 bmi +0x8 /* 000001D6 */
label000001D0:
000001D0 12D8 move.b [A1]+, [A0]+
000001D2 51C8 FFFC dbf D0, -0x6 /* 000001D0 */
label000001D6:
000001D6 2009 move.l D0, A1
000001D8 0800 0000 btst.b D0, 0x0
000001DC 6702 beq +0x4 /* 000001E0 */
000001DE 5289 addq.l A1, 1
label000001E0:
000001E0 32FC 0001 move.w [A1]+, 0x1
000001E4 302E FFF4 move.w D0, [A6 - 0xC]
000001E8 0640 0032 addi.w D0, 0x32 /* '2' */
000001EC 32C0 move.w [A1]+, D0
000001EE 206E 000C movea.l A0, [A6 + 0xC]
000001F2 93D0 sub.l A1, [A0]
000001F4 3D49 FFF6 move.w [A6 - 0xA], A1
000001F8 A02A trap HUnlock
000001FA 3F38 0220 move.w -[A7], [0x00000220 /* MemErr */]
000001FE 6708 beq +0xA /* 00000208 */
00000200 487A 0124 pea.l [PC + 0x124 /* 00000326 */]
00000204 4EAD 0CD2 jsr [A5 + 0xCD2]
label00000208:
00000208 548F addq.l A7, 2
0000020A 202D F3CA move.l D0, [A5 - 0xC36]
0000020E E588 lsl D0, 2
00000210 0680 0000 0018 addi.l D0, 0x18
00000216 2400 move.l D2, D0
00000218 0680 0000 0032 addi.l D0, 0x32 /* '2' */
0000021E D06E FFF4 add.w D0, [A6 - 0xC]
00000222 206E 0008 movea.l A0, [A6 + 0x8]
00000226 A024 trap SetHandleSize
00000228 3F38 0220 move.w -[A7], [0x00000220 /* MemErr */]
0000022C 6708 beq +0xA /* 00000236 */
0000022E 487A 00F6 pea.l [PC + 0xF6 /* 00000326 */]
00000232 4EAD 0CD2 jsr [A5 + 0xCD2]
label00000236:
00000236 548F addq.l A7, 2
00000238 206E 0008 movea.l A0, [A6 + 0x8]
0000023C A029 trap HLock
0000023E 3F38 0220 move.w -[A7], [0x00000220 /* MemErr */]
00000242 6708 beq +0xA /* 0000024C */
00000244 487A 00E0 pea.l [PC + 0xE0 /* 00000326 */]
00000248 4EAD 0CD2 jsr [A5 + 0xCD2]
label0000024C:
0000024C 548F addq.l A7, 2
0000024E 2010 move.l D0, [A0]
00000250 C0AD FDA4 and.l D0, [A5 - 0x25C]
00000254 2240 movea.l A1, D0
00000256 302E FFF4 move.w D0, [A6 - 0xC]
0000025A 43F1 0030 lea.l A1, [A1 + D0.w + 0x30]
0000025E 32C2 move.w [A1]+, D2
00000260 4259 clr.w [A1]+
00000262 202D F3CA move.l D0, [A5 - 0xC36]
00000266 5340 subq.w D0, 1
00000268 6B10 bmi +0x12 /* 0000027A */
0000026A 323C 0030 move.w D1, 0x30 /* '0' */
label0000026E:
0000026E 32FC 0008 move.w [A1]+, 0x8
00000272 32C1 move.w [A1]+, D1
00000274 5041 addq.w D1, 8
00000276 51C8 FFF6 dbf D0, -0xC /* 0000026E */
label0000027A:
0000027A 32FC 0018 move.w [A1]+, 0x18
0000027E 32FC 0002 move.w [A1]+, 0x2
00000282 202D F3CA move.l D0, [A5 - 0xC36]
00000286 3340 0010 move.w [A1 + 0x10], D0
0000028A 22AE FFF8 move.l [A1], [A6 - 0x8]
0000028E 336E FFEC 0004 move.w [A1 + 0x4], [A6 - 0x14]
00000294 4269 0006 clr.w [A1 + 0x6]
00000298 236D F3CE 000C move.l [A1 + 0xC], [A5 - 0xC32]
0000029E 236D F4EC 0008 move.l [A1 + 0x8], [A5 - 0xB14]
000002A4 43E9 0012 lea.l A1, [A1 + 0x12]
000002A8 93D0 sub.l A1, [A0]
000002AA 3D49 FFF4 move.w [A6 - 0xC], A1
000002AE A02A trap HUnlock
000002B0 3F38 0220 move.w -[A7], [0x00000220 /* MemErr */]
000002B4 6708 beq +0xA /* 000002BE */
000002B6 487A 006E pea.l [PC + 0x6E /* 00000326 */]
000002BA 4EAD 0CD2 jsr [A5 + 0xCD2]
label000002BE:
000002BE 548F addq.l A7, 2
000002C0 302E FFEC move.w D0, [A6 - 0x14]
000002C4 B06E FFF2 cmp.w D0, [A6 - 0xE]
000002C8 670A beq +0xC /* 000002D4 */
000002CA 5240 addq.w D0, 1
000002CC 3D40 FFEC move.w [A6 - 0x14], D0
000002D0 6000 FE74 bra -0x18A /* 00000146 */
label000002D4:
000002D4 082E 0007 FFEB btst.b [A6 - 0x15], 0x7
000002DA 6616 bne +0x18 /* 000002F2 */
000002DC 206E FFF8 movea.l A0, [A6 - 0x8]
000002E0 A02A trap HUnlock
000002E2 3F38 0220 move.w -[A7], [0x00000220 /* MemErr */]
000002E6 6708 beq +0xA /* 000002F0 */
000002E8 487A 003C pea.l [PC + 0x3C /* 00000326 */]
000002EC 4EAD 0CD2 jsr [A5 + 0xCD2]
label000002F0:
000002F0 548F addq.l A7, 2
label000002F2:
000002F2 302E FFFC move.w D0, [A6 - 0x4]
000002F6 B06E FFFE cmp.w D0, [A6 - 0x2]
000002FA 6708 beq +0xA /* 00000304 */
000002FC 526E FFFC addq.w [A6 - 0x4], 1
00000300 6000 FD9E bra -0x260 /* 000000A0 */
label00000304:
00000304 486D 0CE2 pea.l [A5 + 0xCE2]
00000308 A9F1 trap UnloadSeg
0000030A 3F38 0220 move.w -[A7], [0x00000220 /* MemErr */]
0000030E 6708 beq +0xA /* 00000318 */
00000310 487A 0014 pea.l [PC + 0x14 /* 00000326 */]
00000314 4EAD 0CD2 jsr [A5 + 0xCD2]
label00000318:
00000318 548F addq.l A7, 2
0000031A 4CDF 030F movem.l A1,A0,D3,D2,D1,D0, [A7]+
0000031E 4E5E unlink A6
00000320 2E97 move.l [A7], [A7]
00000322 4FD7 lea.l A7, [A7]
00000324 4E75 rts
00000326 9345 subx.w D1, D5
00000328 5854 addq.w [A4], 4
0000032A 4552 chk.w D2, [A2]
0000032C 4E41 trap 1
0000032E 4C53 494E movem.l A6,A3,A0,D6,D3,D2,D1, [A3]
00000332 4954 chk.w D4, [A4]
00000334 4941 chk.w D4, D1
00000336 4C49 5345 movem.l A6,A4,A1,A0,D6,D2,D0, A1
0000033A 0000 .incomplete